package Homework04;

public class Homework06 {
	public static void main(String[] args) {
		String str1 = "java woaijava,i liek jajavava,i enjoy java";
		String str2 = "java";
		int indexOf = 0;
		while (indexOf != -1) {
			indexOf = str1.indexOf(str2);
			if (indexOf != -1) {
				String substring1 = str1.substring(0, indexOf);
				String substring2 = str1.substring(indexOf + str2.length(), str1.length());
				str1 = substring1 + substring2;
			}
		}
		System.out.println(str1);
	}

}
